﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="AdminPage.aspx.cs" Inherits="MusicSite.Views.Content.User.AdminPage"%>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Admistrator page
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<form id="form1" runat="server">
<div>
    <h2>Administrator page</h2>
    <div>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
            SelectMethod="GetAllUsers" TypeName="Model.UserProvider">
        </asp:ObjectDataSource>
    </div>
    <div>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" CssClass="index"
            AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
            <Columns>
                <asp:HyperLinkField Text="Edit" DataNavigateUrlFields="UserId" HeaderStyle-Width="30px"
                    DataNavigateUrlFormatString="~/Views/Content/User/EditUser.aspx?userId={0}">
                </asp:HyperLinkField>
                <asp:BoundField DataField="UserId" HeaderText="UserId" Visible="false"
                    SortExpression="UserId" />
                <asp:BoundField DataField="UserName" HeaderText="UserName" 
                    SortExpression="UserName" />
                <asp:BoundField DataField="Password" HeaderText="Password" 
                    SortExpression="Password" />
                <asp:BoundField DataField="UserRole" HeaderText="UserRole" 
                    SortExpression="UserRole" />
            </Columns>
        </asp:GridView>
    </div>
</div>
</form>
<p>
    <asp:HyperLink ID="hyperLink1" runat="server" Text="Create new" 
        NavigateUrl="~/Views/Content/User/EditUser.aspx"></asp:HyperLink>
</p>
</asp:Content>
